/*
 *	2004 JAN 25 SHP
 *		1. Added licence and commnent
 */

using System;

namespace FrameworkQ.ObjectSpace.Data.Schema
{
	/// <summary>
	/// Maps a table for type. For example for a User object we 
	/// want to use a table called MyUser then we do this :
	/// <code>
	///		[TableMap("MyUser"]
	///		public class User
	/// </code>
	/// <seealso cref="FieldMapAttribute"/>
	/// </summary>
	[AttributeUsage(AttributeTargets.Class)]
	public class TableMapAttribute : System.Attribute 
	{
		private string _tableName = "";

		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="tableName">Table to maps to </param>
		public TableMapAttribute(string tableName)
		{
			_tableName = tableName;
		}

		/// <summary>
		/// Table name
		/// </summary>
		public string Name
		{
			get
			{
				return _tableName;
			}
		}
	}
}
